/*
 * interface.c
 *
 *  Created on: 2012-8-16
 *      Author: zhangchao
 */
#include<Game.h>

int findNextStep(int competitorStep, int cpuCoreNum, int os) {
	return calNextStep(competitorStep, cpuCoreNum, os);
}

void initBoard() {
	initGame();
}

bool isStepOK(int step) {

	int oldIndexX;
	int oldIndexY;
	int indexX;
	int indexY;
	int currentIndex = 0;
	int arrayCnt = 30;
	int steps[30];
	int i;

	cutStepIntToParam(step, &oldIndexX, &oldIndexY, &indexX, &indexY);

	calStep(board, oldIndexX, oldIndexY, &currentIndex, &arrayCnt, steps);

	for (i = 0; i < arrayCnt; i++) {
		if (step == steps[i]) {
			return true;
		}
	}
	return false;
}
